package cn.net.java;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;

public class ReadFileDemos {
	public void readFile(String str) throws IOException{
		FileInputStream fis = new FileInputStream(str);
		InputStreamReader isr = new InputStreamReader(fis,"GBK");
		BufferedReader br = new BufferedReader(isr);
		String s;
		StringBuilder sb = new StringBuilder();
		while((s=br.readLine())!=null){
			sb.append(s+"\r\n");
		}
		System.out.println(sb);
	}
	public static void main(String args[]) throws IOException{
		ReadFileDemos rfd = new ReadFileDemos();
		rfd.readFile("aaa.txt");
	}

}
